﻿<DataObjects:EntityControlBase x:Class="DiscoveryLogic.Analytics.Modules.Nodes.ClusterNode"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:NetworkDiagrams="clr-namespace:DiscoveryLogic.Analytics.Modules.Diagrams.NetworkDiagrams"
    xmlns:DataObjects="clr-namespace:DiscoveryLogic.Analytics.DataObjects;assembly=Analytics.DataObjects"
    Height="Auto" Width="Auto" Background="Transparent">
    <DataObjects:EntityControlBase.ToolTip>
        <TextBlock x:Name="txtTooltip" />
    </DataObjects:EntityControlBase.ToolTip>
    <Canvas Background="#72000000">
        <Border 
            x:Name="CollapsedCluster" Width="100" Height="80"
            CornerRadius="35" BorderBrush="DarkGray" BorderThickness="2">
            <Border.Background>
                <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                    <GradientStop Color="Gray" Offset="0"/>
                    <GradientStop Color="Silver" Offset="0.3"/>
                    <GradientStop Color="Gainsboro" Offset="0.6"/>
                    <GradientStop Color="DarkGray" Offset="1"/> 
                </LinearGradientBrush>
            </Border.Background>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="25"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="25"/>
                    <RowDefinition Height="*"/>
                </Grid.RowDefinitions>
                <Button 
                    Grid.Row="0" Grid.Column="1" Width="18" Height="18" VerticalAlignment="Center"
                    x:Name="btnExpandCluster" Click="btnExpandCluster_Click">
                    <TextBlock 
                        FontSize="18" Foreground="White" FontWeight="Bold" Height="28"
                        VerticalAlignment="Center" HorizontalAlignment="Center">+</TextBlock>
                </Button>
                <TextBlock 
                    Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
                    HorizontalAlignment="Center" VerticalAlignment="Center"
                    FontSize="12" FontWeight="Bold" Foreground="White"
                    x:Name="txtClusterSummary">Entities: 100</TextBlock>
            </Grid>
        </Border>
        <NetworkDiagrams:FreeParticleCanvas 
            x:Name="ClusterDiagram" Visibility="Collapsed"
            HorizontalAlignment="Stretch" 
            VerticalAlignment="Stretch" />
        <Button 
            Canvas.Right="10" Canvas.Top="10" Visibility="Collapsed"
            Width="18" Height="18" VerticalAlignment="Center"
            x:Name="btnCloseCluster" Click="btnCloseCluster_Click">
            <TextBlock 
                FontSize="18" Foreground="White" FontWeight="Bold" Height="28"
                VerticalAlignment="Center" HorizontalAlignment="Center">-</TextBlock>
        </Button>
    </Canvas>
</DataObjects:EntityControlBase>
